home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 71.zip
/
BS1 part 71
/
Caligani24_d1.adf
/
makermp.lzh
/
ramps.doc
< prev
Wrap
Text File
|
1993-02-02
|
4KB
|
94 lines
Included here is a program to make images of color transitions - makermp.
makermp requires at least a 68020 processor and 68881 floating point chip
in order to run. It is assumed that the user has a basic understanding of
the Amiga Shell environment and is familiar with text editors.
makermp takes an input ".rmp" ramp file containing color transition
descriptions and outputs 6rn format image files which can be loaded into
Caligari and used as texture maps, backgrounds or foregrounds.
The format of the .rmp file is very simple and should be made in a text
editor such as 'Ed' that comes with the Amiga. The following is an example
.rmp file:
8
0.0 0 0 0 255
0.20 0 0 0 255
0.45 0 0 50 255
0.60 0 0 50 255
0.70 50 0 50 255
0.80 150 70 0 255
0.85 0 0 0 255
1.00 0 0 0 255
Now, what does it all mean? The first line is the number of color
transition points in the file. This example has 8. After the count come
the actual transition points. The number in the leftmost column is a
number between zero and one. This number corresponds to a vertical point
on the output image. Zero is the top scanline and one is the bottom
line. For example, if you are making an image 100 lines high, 0.0 is line
0, 0.5 is line 50, and 1.0 is line 99. Following the transition point
value, on the same line in the .rmp file, are red, green, blue and alpha
values. The RGBA values are in the range 0 to 255 where, for color, 0 is
minimum for each color component and 255 is maximum, and for alpha, 0 is
completely transparent and 255 is completely opaque. Between each color
transition point, the output image will have a completely smooth
transition from one color to the other. If you don't want a smooth
transition, you can put in two different color values with the same
transition point value (i.e. 0.5 34 34 34 255 followed by 0.5 100 0 0 255
will result in an immediate change from dark grey to medium-dark red).
The example .rmp file above will produce the following image:
completely opaque (all alpha values opaque)
top 1/5 of the image completely black
from 1/5 down to about half way down, a gradual transition to dark blue
from about half way down to 6/10 down, the same level of dark blue
from 6/10 to 7/10 down, a transition to dark purple
from 7/10 to 8/10 down, a transition to orange
a very narrow and quick transition to completely black
the last little over 1/10 completely black
This .rmp file was used to create the night.e1d 1D environment map (see
the description of the mktable program below for more info on how to make
a 1D environment out of a .rmp file).
The template for 'makermp' is as follows:
makermp -r XRES YRES infile outfile
replace XRES with the number of pixels wide you wish to make the image.
replace YRES with the number of pixels high you wish to make the image.
replace infile with the name of the .rmp file that contains the list of
transition points as described above. You must give the full name
including any extensions.
replace outfile with the path and name of the output .6rn file you wish
to create. The file will be created with exactly the name you specify
with no extensions added.
For example:
makermp -r 736 482 back.rmp Caligari:night.6rn
Making 1D environment maps:
It is possible to make 1D environment maps from the same .rmp file
described above. To make a 1D environment, use the mktable program supplied
in the RenditionDI: directory as follows:
RenditionDI:mktable infile CalEnviron:outfile.e1d
replace infile with the name of the .rmp file that contains the list of
transition points as described above. You must give the full name
including any extensions.
replace outfile with the name of the output 1D environment file. The
extension .e1d MUST be supplied, or Caligari will not recognize it. In
addition, it must be placed in the CalEnviron: directory, or it will not
be recognized.
For example:
RenditionDI:mktable gray.rmp CalEnviron:gray.e1d